<?php

//////////////////////////////////////////////////
//			Xtra Forum Software                           //
//			      Version 0.1.0                                   //
//		 -----------------------------------------	          //
//               Copyright 2008, Xtra Forum Software           //
//	        http://www.xtraforumsoftware.us.to/           //
/////////////////////////////////////////////////

?>

<?php
	// Connect to Database
	$Database_Server = 'localhost'; // Your database server, usually localhost
	$Database_User = 'waizujin_admin'; // Your database username
	$Database_Pass = 'archive'; // Your database password
	$Database_Name = 'waizujin_Xtra'; // Your database name
	$db_prefix = 'Xtra_'; // Database Prefix

	// Now, actually connect to the database
	mysql_connect("$Database_Server", "$Database_User", "$Database_Pass") or die(mysql_error());
	mysql_select_db("$Database_Name") or die(mysql_error());
	
	// Connect to the setting table to get the settings, duh
	$result = mysql_query("SELECT * FROM " .$db_prefix. "settings");
	while($row = mysql_fetch_array( $result ))
	{
		// Sets the forum version, DO NOT CHANGE!
		$settings['Forum_Version'] = '0.1.0';
		// Set Website Name
		$settings['website_name'] = $row['website_name'];
		// Set Meta Description
		$settings['website_description'] = $row['website_description'];
		// Set Meta Keywords
		$settings['website_keywords'] = $row['website_keywords'];
		// Forum Time Format
		$settings['time_format'] = $row['time_format'];
		// Forum Time Off-set
		$settings['time_offset'] = $row['time_offset'];
		
		// Email Activation Required?
		$settings['email_activation'] = $row['email_activation'];
		
		// Is registration allowed?
		$settings['allow_registration'] = $row['allow_registration'];
		
		// Set Theme URL
		$settings['theme_url'] = './Themes/' .$row['theme_url'];
		// Grab theme ID
		$settings['theme_id'] = $row['theme_id'];
		
		// Set the Language
		$settings['language'] = $row['language'];
		// Set the Language URL
		$settings['language_url'] = './' .$settings['theme_url'].'/languages/' .$settings['language']. '.language.php';
	}

	// Variables DO NOT EDIT Editing these variables could screw the entire forum up!
	$action = mysql_real_escape_string($_GET['action']);
	
?>